package com.ethink.order.api;

import com.ethink.order.api.info.TocSaleImportJobLogInfo;
import com.ethink.order.api.request.TocSaleImportJobLogAddRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 销售单批量导入job处理结果记录表 Facade接口
 *
 * @author default
 * @date 2022-12-20
 */
@FeignClient(name = "ethink-order-service", path = "order-service/facade/v1/tocSaleImportJobLog", contextId = "tocSaleImportJobLogFacade")
public interface TocSaleImportJobLogFacade {


    @PostMapping("add")
    @ResponseBody
    Integer add(@RequestBody TocSaleImportJobLogAddRequest addRequest);

    @GetMapping("queryLogByLogId")
    @ResponseBody
    List<TocSaleImportJobLogInfo> queryLogByLogId(@RequestParam("logId") Long logId);

    @GetMapping("processTocSaleImportJobLog")
    @ResponseBody
    Integer processTocSaleImportJobLog(@RequestParam("id") Long id);

    @GetMapping("queryFailureLogs")
    @ResponseBody
    List<TocSaleImportJobLogInfo> queryFailureLogs(@RequestParam("id") Long id);

    @PostMapping("updateByShopNoAndLogId")
    @ResponseBody
    Integer updateByShopNoAndLogId(@RequestBody TocSaleImportJobLogAddRequest updateRequest);

}